
$(document).ready(function () {
    var navBar = {
        backIcon: $('.mask-menu-content .back-icon'),
        menuIcon: $('.top-bar .menu-icon'),
        menuItem: $('.nav-list li'),
        mask: $('#mask'),
        clickMenuItem: function () {
            this.menuItem.off('click').on('click', function () {
                $(this).addClass('cur').siblings().removeClass('cur')
            })
        },
        clickBackIcon: function () {
            var that = this;
            this.backIcon.off('click').on('click', function () {
                that.mask.hide();
            })
        },
        clickMenuIcon: function () {
            var that = this;
            this.menuIcon.off('click').on('click', function () {
                that.mask.show();
            })
        },
        init: function () {
            this.clickMenuItem();
            this.clickBackIcon();
            this.clickMenuIcon();
        }
    }
    if ($(window).width() < 750) {
        var photographSwiper = new Swiper(".photographSwiper", {
            slidesPerView: 2,
            spaceBetween: 30,
            slidesPerGroup: 4,
            loop: true,
            loopFillGroupWithBlank: true,
            pagination: {
                el: ".swiper-pagination2",
                clickable: true,
            },
            // navigation: {
            //   nextEl: ".swiper-button-next",
            //   prevEl: ".swiper-button-prev",
            // },
        });

    } else {
        var photographSwiper = new Swiper(".photographSwiper", {
            slidesPerView: 4,
            spaceBetween: 30,
            slidesPerGroup: 4,
            loop: true,
            loopFillGroupWithBlank: true,
            pagination: {
                el: ".swiper-pagination2",
                clickable: true,
            },
            // navigation: {
            //   nextEl: ".swiper-button-next",
            //   prevEl: ".swiper-button-prev",
            // },
        });
    }
    photographSwiper.init()
    navBar.init();
})